#include <stdio.h>

int my_money(int x)
{
	int money;
	if(x < 1)
	{
		money = 0;
	}
	if(x == 1)
	{
		money = 100;
	}
	if(x > 1)
	{
		//老师的公式,我的公式错的
		money = my_money(x-1) + 10*(x-1) + 100;
	}
	
	return money;
}

int main(int argc,char *argv[])
{
	int a,ret;//a为天数，ret为总金额
	printf("pls input few days :");
	scanf("%d",&a);
	ret = my_money(a);
	printf("money : %d\n",ret);
	
	return 0;
}